package cn.skycity.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skycity.framework.uaa.pojo.entity.SysMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author haoxr
 * @date 2020-11-06
 */
@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    List<SysMenu> listAllMenus();

    /**
     * 根据用户名获取用户有权限的菜单ID列表
     * @param userName
     * @return
     */
    List<Long> listAuthMenuIds(@Param("userName")String userName);


    /**
     * 根据系统菜单列表
     *
     * @return 菜单列表
     */
    List<SysMenu> selectMenuList();

    List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId);
}
